3.21 \(\int \frac{x^4 \left (A+B x+C x^2\right )}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=339 \[ -\frac{\left (-\frac{A c \left (b^2-2 a c\right )-b C \left (b^2-3 a c\right )}{\sqrt{b^2-4 a c}}+a c C+A b c+b^2 (-C)\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{5/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\left (\frac{A c \left (b^2-2 a c\right )-b C \left (b^2-3 a c\right )}{\sqrt{b^2-4 a c}}+a c C+A b c+b^2 (-C)\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} c^{5/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{B \left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \sqrt{b^2-4 a c}}-\frac{b B \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac{x (A c-b C)}{c^2}+\frac{B x^2}{2 c}+\frac{C x^3}{3 c} \]

[Out]

((A*c - b*C)*x)/c^2 + (B*x^2)/(2*c) + (C*x^3)/(3*c) - ((A*b*c - b^2*C + a*c*C -
(A*c*(b^2 - 2*a*c) - b*(b^2 - 3*a*c)*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[
c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(5/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]
) - ((A*b*c - b^2*C + a*c*C + (A*c*(b^2 - 2*a*c) - b*(b^2 - 3*a*c)*C)/Sqrt[b^2 -
 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(5/
2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - (B*(b^2 - 2*a*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^
2 - 4*a*c]])/(2*c^2*Sqrt[b^2 - 4*a*c]) - (b*B*Log[a + b*x^2 + c*x^4])/(4*c^2)

_______________________________________________________________________________________

Rubi [A]  time = 4.1874, antiderivative size = 339, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 11, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.393 \[ -\frac{\left (-\frac{A c \left (b^2-2 a c\right )-b C \left (b^2-3 a c\right )}{\sqrt{b^2-4 a c}}+a c C+A b c+b^2 (-C)\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{5/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\left (\frac{A c \left (b^2-2 a c\right )-b C \left (b^2-3 a c\right )}{\sqrt{b^2-4 a c}}+a c C+A b c+b^2 (-C)\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} c^{5/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{B \left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \sqrt{b^2-4 a c}}-\frac{b B \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac{x (A c-b C)}{c^2}+\frac{B x^2}{2 c}+\frac{C x^3}{3 c} \]

Antiderivative was successfully verified.

[In]  Int[(x^4*(A + B*x + C*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

((A*c - b*C)*x)/c^2 + (B*x^2)/(2*c) + (C*x^3)/(3*c) - ((A*b*c - b^2*C + a*c*C -
(A*c*(b^2 - 2*a*c) - b*(b^2 - 3*a*c)*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[
c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(5/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]
) - ((A*b*c - b^2*C + a*c*C + (A*c*(b^2 - 2*a*c) - b*(b^2 - 3*a*c)*C)/Sqrt[b^2 -
 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(5/
2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - (B*(b^2 - 2*a*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^
2 - 4*a*c]])/(2*c^2*Sqrt[b^2 - 4*a*c]) - (b*B*Log[a + b*x^2 + c*x^4])/(4*c^2)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 163.925, size = 347, normalized size = 1.02 \[ - \frac{B b \log{\left (a + b x^{2} + c x^{4} \right )}}{4 c^{2}} + \frac{B x^{2}}{2 c} - \frac{B \left (- 2 a c + b^{2}\right ) \operatorname{atanh}{\left (\frac{b + 2 c x^{2}}{\sqrt{- 4 a c + b^{2}}} \right )}}{2 c^{2} \sqrt{- 4 a c + b^{2}}} + \frac{C x^{3}}{3 c} + \frac{x \left (A c - C b\right )}{c^{2}} - \frac{\sqrt{2} \left (- 2 a c \left (A c - C b\right ) + b \left (C a c + b \left (A c - C b\right )\right ) + \sqrt{- 4 a c + b^{2}} \left (C a c + b \left (A c - C b\right )\right )\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{2 c^{\frac{5}{2}} \sqrt{b + \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} + \frac{\sqrt{2} \left (- 2 a c \left (A c - C b\right ) + b \left (C a c + b \left (A c - C b\right )\right ) - \sqrt{- 4 a c + b^{2}} \left (C a c + b \left (A c - C b\right )\right )\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{2 c^{\frac{5}{2}} \sqrt{b - \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**4*(C*x**2+B*x+A)/(c*x**4+b*x**2+a),x)

[Out]

-B*b*log(a + b*x**2 + c*x**4)/(4*c**2) + B*x**2/(2*c) - B*(-2*a*c + b**2)*atanh(
(b + 2*c*x**2)/sqrt(-4*a*c + b**2))/(2*c**2*sqrt(-4*a*c + b**2)) + C*x**3/(3*c)
+ x*(A*c - C*b)/c**2 - sqrt(2)*(-2*a*c*(A*c - C*b) + b*(C*a*c + b*(A*c - C*b)) +
 sqrt(-4*a*c + b**2)*(C*a*c + b*(A*c - C*b)))*atan(sqrt(2)*sqrt(c)*x/sqrt(b + sq
rt(-4*a*c + b**2)))/(2*c**(5/2)*sqrt(b + sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2
)) + sqrt(2)*(-2*a*c*(A*c - C*b) + b*(C*a*c + b*(A*c - C*b)) - sqrt(-4*a*c + b**
2)*(C*a*c + b*(A*c - C*b)))*atan(sqrt(2)*sqrt(c)*x/sqrt(b - sqrt(-4*a*c + b**2))
)/(2*c**(5/2)*sqrt(b - sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 1.23408, size = 460, normalized size = 1.36 \[ \frac{\frac{6 \sqrt{2} \left (A c \left (-b \sqrt{b^2-4 a c}-2 a c+b^2\right )+C \left (b^2 \sqrt{b^2-4 a c}-a c \sqrt{b^2-4 a c}+3 a b c-b^3\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{6 \sqrt{2} \left (C \left (b^2 \sqrt{b^2-4 a c}-a c \sqrt{b^2-4 a c}-3 a b c+b^3\right )-A c \left (b \sqrt{b^2-4 a c}-2 a c+b^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{3 B \sqrt{c} \left (b \sqrt{b^2-4 a c}+2 a c-b^2\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )}{\sqrt{b^2-4 a c}}-\frac{3 B \sqrt{c} \left (b \sqrt{b^2-4 a c}-2 a c+b^2\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\sqrt{b^2-4 a c}}+12 \sqrt{c} x (A c-b C)+6 B c^{3/2} x^2+4 c^{3/2} C x^3}{12 c^{5/2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(x^4*(A + B*x + C*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

(12*Sqrt[c]*(A*c - b*C)*x + 6*B*c^(3/2)*x^2 + 4*c^(3/2)*C*x^3 + (6*Sqrt[2]*(A*c*
(b^2 - 2*a*c - b*Sqrt[b^2 - 4*a*c]) + (-b^3 + 3*a*b*c + b^2*Sqrt[b^2 - 4*a*c] -
a*c*Sqrt[b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]
])/(Sqrt[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + (6*Sqrt[2]*(-(A*c*(b^2 - 2*
a*c + b*Sqrt[b^2 - 4*a*c])) + (b^3 - 3*a*b*c + b^2*Sqrt[b^2 - 4*a*c] - a*c*Sqrt[
b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[
b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - (3*B*Sqrt[c]*(-b^2 + 2*a*c + b*Sqrt[
b^2 - 4*a*c])*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*x^2])/Sqrt[b^2 - 4*a*c] - (3*B*Sq
rt[c]*(b^2 - 2*a*c + b*Sqrt[b^2 - 4*a*c])*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/
Sqrt[b^2 - 4*a*c])/(12*c^(5/2))

_______________________________________________________________________________________

Maple [B]  time = 0.068, size = 1622, normalized size = 4.8 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^4*(C*x^2+B*x+A)/(c*x^4+b*x^2+a),x)

[Out]

1/2/c/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/
((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A*b^2*(-4*a*c+b^2)^(1/2)+1/2*B*x^2/c+1/2/c/(4
*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*
c+b^2)^(1/2))*c)^(1/2))*A*b^2*(-4*a*c+b^2)^(1/2)+5/2/c/(4*a*c-b^2)*2^(1/2)/((b+(
-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))
*b^2*C*a-5/2/c/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x
*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*b^2*C*a-1/2/c^2/(4*a*c-b^2)*2^(1/2)/
((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c
)^(1/2))*C*(-4*a*c+b^2)^(1/2)*b^3-1/2/c^2/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(
1/2))*c)^(1/2)*arctan(c*x*2^(1/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________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{2 \, C c x^{3} + 3 \, B c x^{2} - 6 \,{\left (C b - A c\right )} x}{6 \, c^{2}} - \frac{\int \frac{B b c x^{3} + B a c x - C a b + A a c -{\left (C b^{2} -{\left (C a + A b\right )} c\right )} x^{2}}{c x^{4} + b x^{2} + a}\,{d x}}{c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*x^4/(c*x^4 + b*x^2 + a),x, algorithm="maxima")

[Out]

1/6*(2*C*c*x^3 + 3*B*c*x^2 - 6*(C*b - A*c)*x)/c^2 - integrate((B*b*c*x^3 + B*a*c
*x - C*a*b + A*a*c - (C*b^2 - (C*a + A*b)*c)*x^2)/(c*x^4 + b*x^2 + a), x)/c^2

_______________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*x^4/(c*x^4 + b*x^2 + a),x, algorithm="fricas")

[Out]

Exception raised: NotImplementedError

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**4*(C*x**2+B*x+A)/(c*x**4+b*x**2+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 1.58458, size = 1, normalized size = 0. \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*x^4/(c*x^4 + b*x^2 + a),x, algorithm="giac")

[Out]

Done